<!--
*Author：
 *Contact：
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/PROJ_ReqMaterial.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/PROJ_ReqMaterial.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'PROJReqMaterial_Id',
                footer: "Foots",
                cnName: '所需材料',
                name: 'workbusiness/PROJ_ReqMaterial',
                url: "/PROJ_ReqMaterial/",
                sortName: "CreateOn"
            });
            const editFormFields = ref({"RequiredMaterialName":"","Status":""});
            const editFormOptions = ref([[{"title":"所需材料","field":"RequiredMaterialName","type":"text"},
                               {"title":"状态","field":"Status","type":"text"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'PROJReqMaterial_Id',title:'PROJReqMaterial_Id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'RequiredToolName',title:'RequiredToolName',type:'string',width:110,hidden:true,align:'left'},
                       {field:'RequiredMaterialName',title:'所需材料',type:'string',width:110,align:'left',sort:true},
                       {field:'Description',title:'描述',type:'string',width:220,align:'left'},
                       {field:'Status',title:'状态',type:'string',width:110,align:'left'},
                       {field:'CreateBy',title:'创建人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateOn',title:'创建时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'UpdateBy',title:'更新人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'LastUpdateOn',title:'更新时间',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'IsDeleted',title:'逻辑删除 0/不删除 1/已删除',type:'bool',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
